from PyQt5.QtWidgets import *
from PyQt5 import QtGui
import sys
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import time
import pymysql
import sys
sys.path.append("../database/admin")
sys.path.append("..")
import interface.admin.admin_main0 as admin_main0
import interface.admin.stu_related_Window as stu_related_Window
import interface.admin.tea_related_Window as tea_related_Window
import interface.admin.date_time_Window as date_time_Window
import interface.Main0_Window as Main0_Window
import interface.admin.schedule_course_Window as scW
class admin_main0_window(QMainWindow,admin_main0.Ui_Formb):###点击用户身份弹出的登陆小弹窗
    def __init__(self):
        QMainWindow.__init__(self)
        admin_main0.Ui_Formb.__init__(self)
        self.setupUi(self)
        self.setWindowTitle("教务管理员界面")
        self.stu_info.clicked.connect(self.stu_info_)
        self.tea_info.clicked.connect(self.tea_info_)
        self.set_time.clicked.connect(self.settime)
        self.quit.clicked.connect(QCoreApplication.instance().quit)
        self.back.clicked.connect(self.load_pre_window)
        self.sch_course.clicked.connect(self.load_sch)
        self.sort_course.clicked.connect(self.get_course_res)
        s0_ = QPixmap("admin/s0.png")
        self.s0.setPixmap(s0_)
        self.s0.setScaledContents(True)
        s1_ = QPixmap("admin/s1.png")
        self.s1.setPixmap(s1_)
        self.s1.setScaledContents(True)
        s2_ = QPixmap("admin/s2.png")
        self.s2.setPixmap(s2_)
        self.s2.setScaledContents(True)
        s3_ = QPixmap("admin/s3.png")
        self.s3.setPixmap(s3_)
        self.s3.setScaledContents(True)
        s4_ = QPixmap("admin/s4.png")
        self.s4.setPixmap(s4_)
        self.s4.setScaledContents(True)
        p = QPalette()
        p_ = QPixmap("s000.jpg")
        p_ = p_.scaled(self.width(), self.height())
        p.setBrush(QPalette.Background, QBrush(p_))
        self.setPalette(p)
    def get_course_res(self):
        pass
    def load_sch(self):
        self.sch_course_window=scW.schedule_course_window()
        self.sch_course_window.show()
        self.close()
    def settime(self):
        self.set_time_window=date_time_Window.date_time_window()
        self.set_time_window.show()
    def stu_info_(self):
        self.stu_info_window=stu_related_Window.stu_related_window()
        self.stu_info_window.show()
        self.close()
    def tea_info_(self):
        self.tea_info_window=tea_related_Window.tea_related_window()
        self.tea_info_window.show()
        self.close()
    def load_pre_window(self):
        self.pre_window=Main0_Window.Main0_Window()
        self.pre_window.show()
        self.close()
if __name__=='__main__':
    app=QApplication(sys.argv)
    md=admin_main0_window()
    md.show()
    sys.exit(app.exec_())